/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dale2507.gates.gate.logic;

import dale2507.gates.Messenger;
import dale2507.gates.exceptions.GateConnectionException;
import dale2507.gates.exceptions.PermissionException;
import dale2507.gates.gate.Activator;
import org.bukkit.command.CommandSender;

/**
 *
 * @author Dale
 */
public class QuickDial extends IActivatorLogic {
    
    public QuickDial(Activator activator, CommandSender cs) {
        super(activator, cs);
    }

    @Override
    public void run() {
        try {
            this.getActivator().findDestination();
            this.getActivator().checkDestination();
            this.getActivator().establish();
        } catch (GateConnectionException | PermissionException ex) {
            this.sendMessage(Messenger.ERROR, ex.getMessage());
        }
    }

    @Override
    public void stop() {
        throw new UnsupportedOperationException("Not supported yet.");
    }
    
}
